package com.b511.swpu.cementbackend.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Range;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

@Entity
@Getter
@Setter
@Accessors(chain = true)
// 水泥浆实验基本信息 对应表 CM_SLURRY_EXPERIMENT_BASIC
public class CM_SlurryExperimentBasic extends BABaseEntity {
    @Id
    @GenericGenerator(name="slurryBasicGenerator", strategy="uuid")
    @GeneratedValue(generator="slurryBasicGenerator")
    private String CM_SlurryExperimentBasic_ID;

    @Basic
    @Column(name = "CASINGSIZE")
    private Double casingSize;

    @Basic
    @Column(name = "SLURRYTYPE", length = 50)
    private String slurryType;

    @Basic
    @Column(name = "NO", length = 50)
    private String NO;

    @Basic
    @Column(name = "CLIENT", length = 50)
    private String client;

    @Basic
    @Column(name = "LAB", length = 50)
    private String lab;

    @Basic
    @Column(name = "PLATFORMNO", length = 50)
    private String platformNo;

    @Basic
    @Column(name = "WELLDEPTH")
    private Double wellDepth;

    @Basic
    @Column(name = "VERTICALDEPTH")
    private Double verticalDepth;

    @Basic
    @Column(name = "BHP")
    private Double BHP;

    @Basic
    @Column(name = "BHST")
    private Double BHST;

    @Basic
    @Column(name = "BHCT")
    private Double BHCT;

    @Basic
    @Column(name = "TEMPERATUREGRADIENT")
    private Double temperatureGradient;

    @Basic
    @Column(name = "FILLTIME")
    private Double fillTime;

    @Basic
    @Column(name = "SPECIFICATION", length = 100)
    private String specification;

    @Temporal(TemporalType.DATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Basic
    @Column(name = "EXPERIMENTDATE")
    private Date experimentDate;

    @Basic
    @Column(name = "EXPERIMENTPERSON", length = 50)
    private String experimentPerson;

    @Temporal(TemporalType.DATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Basic
    @Column(name = "CHECKDATE")
    private Date checkDate;

    @Basic
    @Column(name = "CHECKPERSON", length = 50)
    private String checkPerson;

    @Basic
    @Column(name = "BA_WELL_ID")
    @JsonIgnore
    private Long ba_well_id;

    @ManyToOne
    @JoinColumn(name="cm_basic_id")
    private CM_Basic basic;

}
